package com.qf.dao;

import com.qf.pojo.Order;
import com.qf.pojo.OrderItem;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @author Mr.Liu
 * @date 2021/11/27 20:08
 */

public interface OrderDao {
    public int addOrder(Order order) throws SQLException;

    /**
     * 生成订单
     * @param orderItem
     * @throws SQLException
     */
    void addOrderItem(OrderItem orderItem) throws SQLException;

    /**
     * 查询总记录数
     * @param uid
     * @return
     */
    int foundTotalSize(String uid) throws SQLException;

    /**
     * 查询订单集合
     * @param currentPage
     * @param pageSize
     * @param uid
     * @return
     */
    List<Order> foundOrderByPage(int currentPage, int pageSize, String uid) throws SQLException, InvocationTargetException, IllegalAccessException;

}

